﻿namespace OpenAIProxy;

public interface ITokenCounter
{
    int CalculateTokens(string text);
}

public class TokenCounter : ITokenCounter
{
    public int CalculateTokens(string text) => 
        text.Length / 4 + (text.Length % 4 > 0 ? 1 : 0);
}
